A device that effects locking or unlocking, for example, by use of a magnetic card has heretofore been known and disclosed as "Lock Structure", for example, in Japanese Patent Post-Exam Publication No. 58-41391 (1983). This prior art includes a slider which is capable of being moved from a lock position to an unlock position by insertion of a magnetic card comprising a magnetic code, lock pins made of magnets which are disposed within the slider and which are slidable in a direction perpendicular to the sliding direction of the slider, and a lock plate disposed along the slider and having holes for accommodating a projecting part of each of the lock pins projecting from the slider when the slider is set at the lock position.
The above-described prior art suffers, however, from the disadvantage that, when it becomes necessary to inspect the inside of the device because of a failure in the mechanism inside the casing of the lock (i.e., a door knob in this case) or it is desired to change the magnetic code of the magnet lock pins, it is difficult to open, i.e., disassemble, the casing, so that it is considerably troublesome to carry out these operations.
As another prior art, proposed to solve the disadvantage of the above-described prior art, Japanese Patent Post-Exam Publication No. 02-28658 (1990) discloses "Casing of Card Lock". This prior art includes a lower casing member attached, for example, to a wall of a building; an upper casing member being removably attached to the lower casing member, means for connecting the upper casing member to the lower casing by engagement, and a slider that is accommodated in a space defined between the two casing members. The slider is caused to slide by insertion of a suitable magnetic card bearing a magnetic code into the casing to turn on a switch for locking and unlocking and, at the same time, the engagement made by the connecting means is canceled in response to the movement of the slider, thereby enabling the casing to be readily disassembled.
However, according to this prior art, in order to hold the "on" state of the switch, it is necessary to hold the magnetic card within the casing throughout the "on" state. In other words, if the card is pulled out, the switch is automatically turned off. Accordingly, this switch device has a disadvantage that if instead of being applied not to an on-off operation of a lock, it is applied to an on-off control operation of an illumination means, it is troublesome to perform an operation of holding the "on" state for the illumination means. Therefore, it is not practical to apply the device for on-off control in an illumination means. In addition, disassembly of the casing always requires an extra operation, that is, the switch must be turned on at the same time. Therefore, even if the user lends the magnetic card to a third party for an operation of turning on the switch, for example, there is a danger that the third party may disassemble the casing in addition to the switch "on" operation and tamper with the internal mechanism of the lock or change the magnetic code of the magnet lock pins.